package levels
{
	import org.flixel.*;
	
	import states.GameState;
	import enemies.*;
	import interactions.*;
	import items.*;
	import treasures.*;
	
	/**
	 * ...
	 * @author JAC
	 */
	public class Level_3 extends GameState
	{
		protected var _slow:Slow;
		
		override public function create():void
		{
			super.create();
			
			_maze.load(MazeData.level_3);
			Player.spawnAt(17, 18);
			
			Tracker.lives = 0;
			Tracker.mapScore = 1000;
			Tracker.minScore = 2;
			
			_slow = new Slow(16, 18);
			_slow.addText("info", "Slow Time", 80, 2);
			_slow.say("info");
			
			addEntity(_slow);
			addEntity(new Slow(15, 16));
			addEntity(new Slow(15, 12));
			addEntity(new Slow(15, 8));
			
			addEntity(new LootBag(15, 18));
			addEntity(new LootBag(15, 14));
			addEntity(new LootBag(15, 10));
			addEntity(new LootBag(15, 6));
			
			var robber:Robber = new Robber(0, 14);
			robber.setBaseSpeed(robber.speed * 1.05);
			addEntity(robber);
			
			robber = new Robber(0, 6);
			robber.setBaseSpeed(robber.speed * 1.05);
			addEntity(robber);
			
			robber = new Robber(28, 10);
			robber.setBaseSpeed(robber.speed * 1.05);
			addEntity(robber);

			gameStart();
		}
		
		override public function update():void
		{
			if (Registry.paused && _slow.alive && _slow.exists) {
				_slow.say("info");
			}
			
			super.update();
		}
	}
}